package Task1;

import java.util.InputMismatchException;
import java.util.Scanner;

public class IdException {
    public IdException() {
    }

    public static int id;

    public static int getId() {
        return id;
    }

    public static Scanner sc = new Scanner(System.in);

    public static void reset() {
        IdException.id = 0;
    }

    public static void setId() throws InputMismatchException {
        System.out.println("请输入需要设置的学号：");
        IdException.id = sc.nextInt();
    }
}
